assume cs:code,ds:data,ss:stack


data segment
                dw 0123H,0456H,0ABCH,0FEDH,0CBAH,0987H
data ends


stack segment stack
                dw 0,0,0,0,0,0,0,0
                dw 0,0,0,0,0,0,0,0
stack ends


code segment
start:          mov ax,stack
                mov ss,ax
                mov sp,32

                mov ax,data
                mov ds,ax

                mov bx,0
                mov cx,6

inter:          push ds:[bx]
                add bx,2
                loop inter

                mov cx,6
                mov bx,0

outnum:         pop ds:[bx]
                add bx,2
                loop outnum


                mov ax,4c00H
                int 21H

code ends

end start